Skip to content

Russian Localization & Cyrillic Fixes#125

Open
Neeo1504 wants to merge 13 commits intoDaleHuntGB:mainfrom
Neeo1504:RussianLocalization
Open

Russian Localization & Cyrillic Fixes#125
Neeo1504 wants to merge 13 commits intoDaleHuntGB:mainfrom
Neeo1504:RussianLocalization

Conversation

@Neeo1504
Copy link
Copy Markdown

Main changes

  1. Full Russian translation

    • Added Locales/ruRU.lua containing all localized strings for the addon’s interface, including general settings, power colors, spell/item management, profiles, and support messages.
    • All strings are wrapped using AceLocale and are properly loaded when the game client is set to Russian (ruRU).
  2. Cyrillic font support

    • Modified GUI.lua to apply the user-selected font (BCDM.Media.Font) to all relevant UI elements (headings, labels, interactive labels, info tags).
    • Added helper function SetFontForAceWidget to unify font handling across AceGUI widgets.
    • Removed excessive font overrides that previously caused visual glitches in the Profile section.
  3. Spell name truncation fix

    • Increased maximum allowed characters for the cast bar spell name from 32 to 64 (GUI.lua).
    • Changed logic in CastBar.lua so that setting "Max Characters" to 0 now displays the full spell name instead of an empty string, which is especially useful for longer Russian spell names.
  4. Additional missing translations

    • Added translations for previously untranslated UI elements: "Custom Glows", "Font Colour", "Settings", "Bottom Right", and various glow-related options.
    • Corrected inconsistent translations (e.g., "Низкий правый" → "Нижний правый").
  5. UI consistency fixes

    • Wrapped raw strings in LL() calls where they were missing (e.g., in glow type dropdown, anchor points).
    • Removed SetFontForAceWidget calls for heading widgets in the Profile section that caused layout corruption.

All changes have been tested with the Russian game client and ensure that every visible part of the addon is properly translated and displayed with the correct fonts.

Neeo1504 added 12 commits March 24, 2026 14:42
Add file with russian localization (ver. 1.0)
Added connection to a file with Russian localization
If maxChar = 0, then show full spellname
Increased the spell name length setting to 64 characters
Comment thread Core/GUI.lua
spellName_MaxCharactersSlider:SetLabel(LL("Max Characters"))
spellName_MaxCharactersSlider:SetValue(BCDM.db.profile.CastBar.Text.SpellName.MaxCharacters)
spellName_MaxCharactersSlider:SetSliderValues(0, 32, 1)
spellName_MaxCharactersSlider:SetSliderValues(0, 64, 1)
Copy link
Copy Markdown

@lorientalas lorientalas Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it's better to fix sub at CastBar.lua:13

local function GetDisplayCastText(text, maxChars)
    if not text then return "" end
    if BCDM:IsSecretValue(text) then
        return text
    end
    if strlenutf8(text) > maxChars then
        return string.utf8sub(text, 1, maxChars) .. "..."
    end
    return text
end

?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello!
Thanks a ton for the great catch! You're absolutely right — using plain string.sub on Russian text is just asking for trouble. Your solution with strlenutf8 and string.utf8sub is way cleaner and actually correct. I really appreciate you taking the time to point that out.
Here's the final version of the function I'm using now:

lua
local function GetDisplayCastText(text, maxChars)
    if not text then return "" end
    if BCDM:IsSecretValue(text) then
        return text
    end
    if maxChars == 0 then
        return text
    end
    if strlenutf8(text) > maxChars then
        return string.utf8sub(text, 1, maxChars) .. "..."
    end
    return text
end

It keeps the "no limit" behavior when maxChars == 0 (so people can still see full spell names if they want), and now truncates safely with an ellipsis. The slider still goes up to 64, but now it actually works as expected for any language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants